import request from "@/utils/request";

export function rolePage(data) {
  return request({
    method: 'post',
    url: '/roles/page',
    data
  })
}

export function addOrUpdate(data) {
  return request({
    url: '/roles/add/edit',
    method: "post",
    data
  })
}

export function getOneRole(id) {
  return request({
    url: '/roles/one/' + id,
    method: "get"
  })
}


export function removeRole(id) {
  return request({
    url: '/roles/remove/' + id,
    method: "get"
  })
}

export function batchDelete(data) {
  return request({
    url: '/roles/batch/remove',
    method: "post",
    data
  })
}

export function roleList() {
  return request({
    url: '/roles/list',
    method: "get",
  })
}
